<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html><head>
<title>tree</title>
</head><body>
<p>[<a href="mxdoc.htm">mainpage</a>]
[<a href="tags.htm">tags</a>]<br>
<h1><a name="tree">module: tree</a></h1><p><b>Tree structure handling macros</b><p>

This module conatins some convenience macros for handling tree
structures.  If you define your type as <pre>
typedef struct YOURTYPE {
    ...
    MX_TREE(struct YOURTYPE);
    ...
} YOURTYPE; </pre>
Then you can use these macros to manipulate your type as a tree.
 
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p>Part of the <a href="deds.htm">deds</a> library.<ul><li>
<a name="define MX_TREE(type)"><code>#define MX_TREE(type)</code></a>
<p>
<p><b>Declare elements for a tree structure</b><p>
This macro declares elements for a tree structure.  This
delcaration must be included in a struct with an appropriate type.  The
surrounding type can then be manupulated by the other mx_tree_* functions.  
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define MX_TREE_INSERT(o,p)"><code>#define MX_TREE_INSERT(o,p)</code></a>
<p>
<p><b>Insert a tree element into a parent. </b><p>
The inserted element is placed after the existing children of the parent.  An tree element
cannot be inserted into itself.  
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define MX_TREE_REMOVE(o)"><code>#define MX_TREE_REMOVE(o)</code></a>
<p>
<p><b>Remove a tree element from a parent.  </b><p>
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define mx_tree_first(o)"><code>#define mx_tree_first(o)</code></a>
<p>
<p><b>The first child element of a parent.  </b><p>
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define mx_tree_last(o)"><code>#define mx_tree_last(o)</code></a>
<p>
<p><b>The last child element of a parent.  </b><p>
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define mx_tree_next(o)"><code>#define mx_tree_next(o)</code></a>
<p>
<p><b>The next child element with the same parent.  </b><p>
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define mx_tree_prev(o)"><code>#define mx_tree_prev(o)</code></a>
<p>
<p><b>The previous child element with the same parent.  </b><p>
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
<li>
<a name="define mx_tree_parent(o)"><code>#define mx_tree_parent(o)</code></a>
<p>
<p><b>The parent tree element.  </b><p>
(<a href="../include/deds/tree.h">../include/deds/tree.h</a>)<p></li>
</ul><p>Generated by <a href="http://www.deleveld.dds.nl/mxdoc/index.htm">MXDOC</a> 2.2 on Sun Feb  4 15:16:26 2007


</body></html>
